#!/bin/bash

command=/data/server/game_log_1/import.sh

DATA_ROOT="/data/server/game/data"
BAK_ROOT="/data/server/game_log_1/bak"
DATA_BASE="dal_game_log_1"
DATABASE_ADDRESS="10.0.0.4"
DATABASE_USER="admin"
DATABASE_PASS="123456!@#"
echo "start import job>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"

echo "start import playerAction ------------------------------------------------------------------"
${command} ${DATA_ROOT} ${BAK_ROOT} "playerAction" "${DATA_BASE}.t_player_action_log" ${DATABASE_ADDRESS} ${DATABASE_USER} ${DATABASE_PASS}

echo "start import playerLogin ------------------------------------------------------------------"
${command} ${DATA_ROOT} ${BAK_ROOT} "playerLogin" "${DATA_BASE}.t_player_login_log" ${DATABASE_ADDRESS} ${DATABASE_USER} ${DATABASE_PASS}

echo "start import playerLogout ------------------------------------------------------------------"
${command} ${DATA_ROOT} ${BAK_ROOT} "playerLogout" "${DATA_BASE}.t_player_logout_log" ${DATABASE_ADDRESS} ${DATABASE_USER} ${DATABASE_PASS}

echo "start import playerLvl ------------------------------------------------------------------"
${command} ${DATA_ROOT} ${BAK_ROOT} "playerLvl" "${DATA_BASE}.t_player_lvl_log" ${DATABASE_ADDRESS} ${DATABASE_USER} ${DATABASE_PASS}

echo "start import playerRegister ------------------------------------------------------------------"
${command} ${DATA_ROOT} ${BAK_ROOT} "playerRegister" "${DATA_BASE}.t_player_register_log" ${DATABASE_ADDRESS} ${DATABASE_USER} ${DATABASE_PASS}

echo "start import item ------------------------------------------------------------------"
${command} ${DATA_ROOT} ${BAK_ROOT} "item" "${DATA_BASE}.t_item_log" ${DATABASE_ADDRESS} ${DATABASE_USER} ${DATABASE_PASS}

echo "start import role ------------------------------------------------------------------"
${command} ${DATA_ROOT} ${BAK_ROOT} "role" "${DATA_BASE}.t_role_log" ${DATABASE_ADDRESS} ${DATABASE_USER} ${DATABASE_PASS}

echo "start import dating ------------------------------------------------------------------"
${command} ${DATA_ROOT} ${BAK_ROOT} "dating" "${DATA_BASE}.t_dating_log" ${DATABASE_ADDRESS} ${DATABASE_USER} ${DATABASE_PASS}

echo "start import building ------------------------------------------------------------------"
${command} ${DATA_ROOT} ${BAK_ROOT} "building" "${DATA_BASE}.t_building_log" ${DATABASE_ADDRESS} ${DATABASE_USER} ${DATABASE_PASS}

echo "start import dungeon ------------------------------------------------------------------"
${command} ${DATA_ROOT} ${BAK_ROOT} "dungeon" "${DATA_BASE}.t_dungeon_log" ${DATABASE_ADDRESS} ${DATABASE_USER} ${DATABASE_PASS}

echo "start import angel------------------------------------------------------------------"
${command} ${DATA_ROOT} ${BAK_ROOT} "angel" "${DATA_BASE}.t_angel_log" ${DATABASE_ADDRESS} ${DATABASE_USER} ${DATABASE_PASS}

echo "start import dungeon ------------------------------------------------------------------"
${command} ${DATA_ROOT} ${BAK_ROOT} "hero" "${DATA_BASE}.t_hero_log" ${DATABASE_ADDRESS} ${DATABASE_USER} ${DATABASE_PASS}

echo "start import playerGuide ------------------------------------------------------------------"
${command} ${DATA_ROOT} ${BAK_ROOT} "playerGuide" "${DATA_BASE}.t_player_guide_log" ${DATABASE_ADDRESS} ${DATABASE_USER} ${DATABASE_PASS}

echo "done !!!"

